import 'package:flutter_fronter_service/generated/json/base/json_field.dart';
import 'package:flutter_fronter_service/generated/json/goods_detail_entity.g.dart';
import 'dart:convert';

import 'package:flutter_fronter_service/model/properties_entity.dart';
import 'package:flutter_fronter_service/model/sku_entity.dart';
export 'package:flutter_fronter_service/generated/json/goods_detail_entity.g.dart';

@JsonSerializable()
class GoodsDetailEntity {
	late int id = 0;
	late String name = '';
	late String picture = '';
	late String description = '';
	late int price = 0;
	late String descPictures = '';
	late List<dynamic> mainPictures = [];
	late List<PropertiesEntity> propList = [];
	late List<SkuEntity> skuList = [];

	GoodsDetailEntity();

	factory GoodsDetailEntity.fromJson(Map<String, dynamic> json) => $GoodsDetailEntityFromJson(json);

	Map<String, dynamic> toJson() => $GoodsDetailEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}